import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import TypeNav from '@/components/typeNav'
import MyCarousel from '@/components/carousel'
import Pagination from '@/components/pagination'
import { MessageBox } from 'element-ui'
import VueLazyload from 'vue-lazyload'
import loadimage from '@/assets/aoteman.gif'
//引入表单验证插件
import '@/plugins/valadite'

Vue.component(TypeNav.name, TypeNav);
Vue.component(MyCarousel.name, MyCarousel);
Vue.component(Pagination.name, Pagination);

Vue.prototype.$msgbox = MessageBox;
Vue.prototype.$alert = MessageBox.alert;

Vue.use(VueLazyload, {
  loading: loadimage
});

import '@/mock/mockServe';

import 'swiper/css/swiper.css'

import * as API from '@/api';

Vue.config.productionTip = false;

console.log(process.env);

new Vue({
  beforeCreate() {
    Vue.prototype.$bus = this;
    Vue.prototype.$API = API;
  },
  router,
  store,
  render: h => h(App)
}).$mount('#app')
